<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="./css/style.css">
    <link rel="stylesheet" href="./css/index.css">
    <link rel="stylesheet" href="./css/register.css">
</head>

<body>
    <div class="w1200 ns-header">
        <a href="">
            <img src="./imgs/1.png" alt="">
        </a>
    </div>
    <div class="ns-main w1200">
        <p>
            <span>我已经注册了，现在就</span>
            <a href="./logon.html" class="ns-text-color">登录</a>
        </p>
        <ul class="nav-tabs">
            <li>
                <a href="#">普通注册</a>
                <div></div>
            </li>
        </ul>
        <div class="tab-content">
            <div class="tab-pane">
                <div class="form-group">
                    <label>
                        <span class="ns-text-color">*</span>
                        <span>用户名:</span>
                    </label>
                    <input type="text" id="tel" placeholder="请输入用户名，必须在3到16个字符范围内">
                    <span></span>
                </div>
                <div class="form-group">
                    <label>
                        <span class="ns-text-color">*</span>
                        <span>密码:</span>
                    </label>
                    <input type="password" id="password" placeholder="请输入密码">
                    <span></span>
                </div>
                <div class="form-group">
                    <label>
                        <span class="ns-text-color">*</span>
                        <span></span>
                        <span>确认密码:</span>
                    </label>
                    <input type="text" placeholder="请重新输入密码">
                </div>
                <div class="form-group">
                    <label>
                        <span class="ns-text-color">*</span>
                        <span>验证码:</span>
                    </label>
                    <input type="text" class="form-item" placeholder="请输入验证码">
                    <label class="img">
                        <img class="verifyimg" src="https://www.leishen.cn/captcha"
                            onclick="this.src='https://www.leishen.cn/captcha?tag=1'+'&amp;send='+Math.random()"
                            alt="captcha">
                    </label>
                </div>
                <div class="form-group">
                    <label>
                        <span class="ns-text-color">*</span>
                        <span>手机号码:</span>
                    </label>
                    <input type="text" placeholder="请输入手机号">
                </div>
                <div class="form-group">
                    <label>
                        <span class="ns-text-color">*</span>
                        <span>短信效验码:</span>
                    </label>
                    <input type="text" class="form-item">
                    <button class="btn sendOutCode" type="button">获取短信校验码</button>
                </div>
                <div class="form-group">
                    <label>
                        <span class="ns-text-color">*</span>
                        <span>邮箱:</span>
                    </label>
                    <input type="text" placeholder="请输入邮箱地址">
                </div>
                <div class="form-group">
                    <label></label>
                    <!-- <input type="checkbox"> -->
                    <input type="checkbox" class="form-checkbox">
                    <span class="from-text">
                        <label>我已阅读并同意</label>
                        <a href="" class="ns-text-color" target="_blank">《用户注册协议》</a>
                    </span>
                </div>
                <div class="form-btn">
                    <button id="btn_submit" class="btn btn-primary" type="button"
                        title="请按照要求填写，才能注册的哦">同意协议并注册</button>
                </div>
            </div>
        </div>
    </div>


















    <!-- 底部 -->
    <div class="footerBox"></div>
</body>
<script src="./libs/jquery.js"></script>
<script src="./js/register.js"></script>
<script>
    $(".footerBox").load("http://localhost:3000/public/header.html .dyb-footer")


    var op = 0;
    var ot = 0;
    otel.oninput = function () {

        var reg = /^[a-z0-9_-]{3,16}$/;
        var flag = reg.test(this.value);
        if (flag) {
            this.nextElementSibling.innerHTML = "通过验证";
            ot = 1;
        } else {
            this.nextElementSibling.innerHTML = "不符合账号的基本格式";
            ot = 0;
        }
        if (ot === 1 && op === 1) {
            osubmit.removeAttribute("disabled")
        } else {
            osubmit.setAttribute("disabled", "disabled")
        }
    }
    opassword.oninput = function () {

        var reg = /^[a-z0-9_-]{6,18}$/;
        var flag = reg.test(this.value);
        if (flag) {
            this.nextElementSibling.innerHTML = "通过验证";
            op = 1;
        } else {
            this.nextElementSibling.innerHTML = "不符合密码的基本格式";
            op = 0;
        }
        if (ot === 1 && op === 1) {
            osubmit.removeAttribute("disabled")
        } else {
            osubmit.setAttribute("disabled", "disabled")
        }
    }
</script>

</html>